package com.melody.rest.model;

public enum ResCode {

    SUCCESS(200, "获取数据成功"),

    FAIL(400, "参数或语法错误"),

    TOKEN_NOT_EXIST(401, "TOKEN不存在，认证失败"),

    BANED_REQUEST(403, "无权访问该资源"),

    FATAL("未知致命错误"),
    ;

    private int code;

    private String msg;

    ResCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    ResCode(String msg) {
        this.code = -999;
        this.msg = msg;
    }

    public int getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }

}
